{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "terminal interpret\n",
      "nonterminal iterpret\n",
      "terminal interpret\n",
      "terminal interpret\n"
     ]
    }
   ],
   "source": [
    "class content():\n",
    "    def __init__(self):\n",
    "        self.input=\"\"\n",
    "        self.output=\"\"\n",
    "class abstractexprocess():\n",
    "    def interpret(self,content):\n",
    "        pass\n",
    "class exprocession(abstractexprocess):\n",
    "    def interpret(self,content):\n",
    "        print(\"terminal interpret\")\n",
    "        \n",
    "class noterminalexprocess(abstractexprocess):\n",
    "    def interpret(self,content):\n",
    "        print('nonterminal iterpret')\n",
    "if __name__=='__main__':\n",
    "    context1=\"\"\n",
    "    c=[]\n",
    "    c=c+[exprocession()]\n",
    "    c=c+[noterminalexprocess()]\n",
    "    c=c+[exprocession()]\n",
    "    c=c+[exprocession()]\n",
    "    for a in c:\n",
    "        a.interpret(context1)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
